package cn.toutatis.sandbox.root.security.service.entity;

import cn.toutatis.common.controllerDepand.EntityBasicAttribute;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;

/**
 * <p>
 * 必要用户表
 * </p>
 *
 * @author Toutatis_Gc
 * @since 2020-08-13
 */
public class SystemUser extends EntityBasicAttribute<SystemUser> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id/UUID
     */
    @TableId(value = "uuid",type = IdType.ASSIGN_UUID)
    private String uuid;

    /**
     * 上级用户Id
     */
    @TableField("belongToId")
    private String belongToId;

    /**
     * 账号
     */
    @TableField("`account`")
    private String account;

    /**
     * 用户名
     */
    @TableField("userName")
    private String userName;

    /**
     * 电话
     */
    private String tel;

    /**
     * openId
     */
    @TableField("openId")
    private String openId;

    /**
     * 邮箱
     */
    private String email;

    /**
     * 密文
     */
    private String secret;


    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public String getUuid() {
        return uuid;
    }

    public void setBelongToId(String belongToId) {
        this.belongToId = belongToId;
    }

    public String getBelongToId() {
        return belongToId;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getAccount() {
        return account;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserName() {
        return userName;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    public String getTel() {
        return tel;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    public String getOpenId() {
        return openId;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getEmail() {
        return email;
    }

    public void setSecret(String secret) {
        this.secret = secret;
    }

    public String getSecret() {
        return secret;
    }

    @Override
    protected Serializable pkVal() {
        return this.uuid;
    }

    @Override
    public String toString() {
        return "\r\nSystemUser{" +
            "uuid=" + uuid +
            ", belongToId=" + belongToId +
            ", account=" + account +
            ", userName=" + userName +
            ", tel=" + tel +
            ", openId=" + openId +
            ", email=" + email +
            ", secret=" + secret +
        "}";
    }
}
